package Server.ExtComponents.socket;




import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.channel.Channel;


import java.util.concurrent.ConcurrentLinkedQueue;



public  class ObjectSession{
    // channel
    private Channel channel;


    //待业务层处理的客户端数据
    private  ConcurrentLinkedQueue<ChannelBuffer> HandBuffers = new ConcurrentLinkedQueue<ChannelBuffer>();


    public ObjectSession(Channel channel){

       this.channel=channel;


    }


    public void Destroy(){
            this.HandBuffers.clear();
            this.HandBuffers=null;
            this.channel.close();
    }

    /**
     * 获取待业务层处理的缓存队列
     * @return   ConcurrentLinkedQueue<ChannelBuffer>
     */
    public ConcurrentLinkedQueue<ChannelBuffer> getHandBuffers() {
        return this.HandBuffers;
    }




    /**
     *  clinet channel
     * @return  Channel
     */
    public Channel getChannel() {
        return this.channel;
    }

}
